import {myRequest} from './index.js'

export const getTopBar=async ()=>{
	return await myRequest({
		url: "/api/index_list/top_bar"
	})
}

export const getHomeData=async (topNum,pageNum)=>{
	return await myRequest({
		url: `/api/index_list/${topNum || 1}/data/${pageNum || 1}`
	})
}

export const getKeyword=async (keyword,orderName,pageNum,order)=>{
	return await myRequest({
		url: `/api/search?keyword=${keyword}&order_name=${orderName}&page_num=${pageNum}&page_size=10&order=${order}`
	})
}
export const getShopList=async ()=>{
	return await myRequest({
		url: `/api/shop_list`
	})
}
export const getDetails=async (id)=>{
	return await myRequest({
		url: '/api/details/'+id
	})
}